﻿	      <?php include("conn.php");
             mysql_query('SET NAMES UTF8'); 

	  

class MyPrizeBean
{
	public $fulse;

	function __construct($fulse)
	{
		$this->fulse      = $fulse;
	}
}


$rert30=mysql_query("select *from goodsorders where  ordersid ='".$_REQUEST[ordersid]."'");
$rowf=mysql_fetch_array($rert30);

	$prize = array();
	if($rowf[state]=="4")
	{
	
	   if($rowf[tuikuan]=="1")
	    {
	      $tui=2;	$state=4;
	    }
		
	}
	else
	{
	$tui=0;
	$state=4;
	}
	
	
	
$srat=mysql_query("update goodsorders set state='".$state."' where ordersid='".$_REQUEST[ordersid]."'");
	  
	  $srat1=mysql_query("update goodsorders set tuikuan='".$tui."' where ordersid='".$_REQUEST[ordersid]."'");
	  
	  $srat1=mysql_query("update goodsorders set tuikuaidi='".$_REQUEST[kuaidi]."' where ordersid='".$_REQUEST[ordersid]."'");
	  $srat1=mysql_query("update goodsorders set tuidanhao='".$_REQUEST[danhao]."' where ordersid='".$_REQUEST[ordersid]."'");
	

	      if($srat==true)
	     {
		  $der=100;
		  
		  }
		
		 else
		  {
		   $der=300;
		  }

$prize[] = new MyPrizeBean($der);
echo json_encode($prize);


?>